﻿using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

namespace ZR.Admin.Grpc.Extensions;

public static class GrpcServiceExtensions
{
    public static void AddGrpcServiceConfiguration(this IServiceCollection services, IConfiguration configuration)
    {
        // services.AddTransient<AuthUn>()

        services.AddGrpcClient<Greeter.GreeterClient>(options =>
        {
            options.Address = new Uri(configuration.GetValue<string>("GrpcUrls:FindTeacher"));
        });
    }
}